<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
      #d1{
        width: 50px;
        height: 100px;
        background-color: red;
        position: absolute;
        /*设置显示层级，值越大显示越靠前
        只对非静态定位的元素有效*/
        z-index: 3;
      }
      #d2{
        width: 100px;
        height: 50px;
        background-color: blue;
        position: absolute;
        z-index: 2;
      }
    </style>
</head>
<body>
<div id="d1"></div>
<div id="d2"></div>
</body>
</html>